ASM	= nasm
ASMFLAGS=
TARGET	= boot.bin loader.bin
IMAGE	= ../a.img

boot : $(TARGET)

boot.bin : boot.asm
	$(ASM) $(ASMFLAGS) -o $@ $<
	dd if=$@ of=$(IMAGE) count=1 conv=notrunc

loader.bin : loader.asm
	$(ASM) $(ASMFLAGS) -o $@ $<
	dd if=$@ of=$(IMAGE) count=3 seek=1 conv=notrunc

clean :
	rm $(TARGET)
